<!DOCTYPE html>
<?php
require_once("funcs.php");

$videoId = $_GET['vid'];
$title = $_GET['t'];
$thumbUrl = $_GET['thm'];
$time = $_GET['tm'];
$views = $_GET['v'];
$rating = $_GET['r'];

$playButtons = youtubeData($videoId);
?><html>
<head>
  <link rel="stylesheet" href="jqm/jquery.mobile-1.0a2.css" type="text/css">
  <link rel="stylesheet" href="inmt.css" type="text/css">
  <link rel="apple-touch-icon" href="img/app-icon.png">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

  <title>iNMT</title>

  <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  <meta name="apple-touch-fullscreen" content="YES">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no">

  <script src="jqm/jquery-1.4.4.min.js" type="text/javascript"></script>
  <script src="jqm/jquery.mobile-1.0a2.min.js" type="text/javascript"></script>

  <script src="js/nmt.js" type="text/javascript"></script>
  <script type="text/javascript">
    nmt.setDoneURL('http://localhost:8883/start.cgi');
    nmt.setAddr('192.168.10.19');
  </script>
</head>
<body>
  <div data-role="page">
    <div data-role="header">
      <h4 class="forcewrap">Video Detail</h4>
    </div>
    <div data-role="content">
      <h2><?php echo $title ?></h2>
      <div class="ui-grid-a">
      	<div class="ui-block-a"><img src="<?php echo $thumbUrl; ?>"/></p></div>
      	<div class="ui-block-b">
      	  Duration: <?php echo $time; ?><br/>Views: <?php echo $views; ?><br/>Rating: <?php echo $rating; ?>
      	</div>
      </div>
      <!-- Play buttons -->
      <?php echo $playButtons; ?>
    </div>
  </div>
</body>
</html>